package org.sanmao.wyj.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;
import org.sanmao.wyj.controller.utils.Result;
import org.sanmao.wyj.domain.Message;
import org.sanmao.wyj.domain.User;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestParam;

import javax.servlet.http.HttpServletRequest;
import java.util.List;

public interface UserService extends IService<User> {
    List<User> findAllUsers();
    IPage<User> findPage(int currentPage,int pageSize);
    User findUserById(Integer id);
    Boolean saveUser(User user);
    Boolean deleteUserById(int id);
    Boolean updateUser(User user,HttpServletRequest request);
    String login(User user);
    User findUserByUsernameAndPassword(String username, String password);
    IPage<User> findUserByName(String name,int currentPage,int pageSize);
    User finUserByUsernameAndPhonenum(String username, String phonenum);
    Boolean findPassword(String username, String phonenum, String password);
    int addMoney(double balance, HttpServletRequest request);
    User findMe(HttpServletRequest request);
    int updateUser(User user);
}
